<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue </title>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/3.2.26/vue.global.min.js"></script>
</head>
<body>
    <div id="app">
        <p>{{message}}</p>
        <button @click="reverseString">反转字符串</button>
    
      </div>

<script>
 
const app={

  data(){
    return{
      message:'Hello Vue',

    }
  },methods:{
    reverseString(){
      this.message=this.message.split('').reverse().join('');
    }
  }

}


Vue.createApp(app).mount('#app')
</script>
</body>
</html>